
.entity-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.entity {
    position: absolute;
    width: var(--cell-size);
    height: var(--cell-size);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.3s, left 0.3s;
}

.entity-inner {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    position: relative;
    z-index: 2;
    overflow: hidden; /* Added to clip token images */
}

/* Ensure SVG icons do not overflow and remain centered */
.entity-inner > svg {
    width: 70%;
    height: 70%;
    display: block;
}

.survivor .entity-inner {
    background: #1e293b;
    border: 2px solid #60a5fa;
    color: white;
}

.survivor.selected .entity-inner {
    background: #581c87;
    border-color: #facc15;
    box-shadow: 0 0 10px #facc15;
}

.survivor.dead {
    filter: grayscale(1);
    opacity: 0.5;
}

.enemy .entity-inner {
    background: transparent;
    border: 2px solid #ef4444; /* Added red border to match survivor blue border */
}

.hp-bar {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #333;
}

.hp-fill {
    height: 100%;
    background: var(--accent-red);
}

.survivor .hp-fill { background: #06b6d4; }

/* Footprint Layer */
.footprint-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.footprint-marker {
    position: absolute;
    width: var(--cell-size);
    height: var(--cell-size);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.footprint-marker svg {
    width: 60%;
    height: 60%;
    filter: drop-shadow(0 0 1px black);
}

.footprint-marker.survivor {
    color: #3b82f6;
    opacity: 0.7;
}

.footprint-marker.enemy {
    color: #ef4444;
    opacity: 0.7;
}


.entity.large-enemy .entity-inner {
    width: 90%;
    height: 90%;
}

@keyframes flowerPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.7; }
}

/* Carry tokens seated on a multi-tile carrier (e.g. 天仙花 2×2) */
.survivor.carried-token .entity-inner {
    border-color: #f472b6;
    box-shadow: 0 0 6px rgba(244, 114, 182, 0.85);
}
.survivor.carried-token.selected .entity-inner {
    border-color: #facc15;
    box-shadow: 0 0 10px #facc15;
}

@keyframes flowerEmergeBurst {
    0% { transform: scale(0.55); opacity: 0; }
    35% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}
.flower-tentacle-lash {
    filter: drop-shadow(0 0 4px #4ade80);
}
